﻿using System.Web.Http;
using ML.IBusiness;

namespace ML.WxLite.WebApi.ChineseRestaurant.Controllers
{
    /// <summary>
    /// 登陆api
    /// </summary>
    public class LoginController : BaseApiController
    {
        private readonly IUserBusiness userBusiness;
        public LoginController(IUserBusiness userBusiness)
        {
            this.userBusiness = userBusiness;
        }

        /// <summary>
        /// 商户登录
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        [Route("api/wxlite/merchant/login")]
        [HttpGet]
        public IHttpActionResult WXmerchantLogin(string username, string password)
        {
            var data = userBusiness.WXmerchantLogin(username, password);
            return Json(data);
        }
    }
}
